/**
 * @file Shape.cpp
 * 
 * This file contains the definitions of all the funcitons to manipulate the 
 * Shape class.
 */
#include "Shape.hpp"

/**
 * Default constructor
 */
Shape::Shape(){}

/**
 * Shape constructor
 * @param name: x, y, size, and color - description: center point, size and color
 * given by the user.
 */
Shape::Shape( int x, int y, int size, COLORREF color ) 
{
	Shape::x = x;
	Shape::y = y;
	Shape::size = size;
	Shape::color = color;
}

/**
 * Destructor
 */
Shape::~Shape(){}

/**
 * Move the shape to a desired position.
 * @param name: dx, dy - description: new location passed by the user.
 */
void Shape::move( int dx, int dy )
{
	x = x + dx;
	y = y + dy;
}

/**
 * Increases or decreases the size of a shape.
 * @param name: dsize - deescription: specifies how much the shape should
 * be decreased or increased.
 */
void Shape::resize( int dsize )
{
	if( size > 10 && dsize < 0 )
	 size = size + dsize;

	if( size < 500 && dsize > 0)
		size = size + dsize;
}
